#9_2_3 元组的遍历
tuple_1 = ('a1','b2','b3','b4','b5','b6')

# 正向遍历-while
i=0
while i<len(tuple_1):
    print(f"for正向遍历tuple_1的第{i}个值为：{tuple_1[i]}")
    i+=1
# 正向遍历 for
i = 0
for x in tuple_1:
    print(f"for正向遍历tuple_1的第{i}个值为：{x}")
    i+=1

# 反向遍历-while
i = len(tuple_1)
while i>0:
    i-=1
    print(f"while反向遍历tuple_1的第{i}个值为：{tuple_1[i]}")

# 反向遍历 for
i = len(tuple_1)
for x in tuple_1:
    i-=1
    print(f"for反向遍历tuple_1的第{i}个值为：{tuple_1[i]}")

